﻿@using Helper
@using CoreData
@model User
@if (SessionManagement.GetSessionReturnToString("UserID") != null)
{
    <li class="top-show-dropdown"><span>Xin chào, </span><a class="top-link" href="@Url.Action("Profile", "User")">
        @SessionManagement.GetSessionReturnToString("UserName")</a>
        <div class="top-dropdown left">
                <div class="arrow-up">
                </div>
                <ul>
                    <li>
                        <a href="@Url.Action("Profile", "User")">Xem thông tin cá nhân</a>
                    </li>
                    <li>
                        <a href="@Url.Action("LogOffHome", "Home")">Thoát tài khoản</a>
                        <div class="clearfix">
                        </div>
                    </li>
                </ul>
            </div>
    </li>
}
else
{
    <li class="top-show-dropdown login-top"><a class="top-link" href="@Url.Action("LoginHome", "Home")">
        Đăng nhập</a>
        @using (Html.BeginForm("LoginHome", "Home", FormMethod.Post, new { @class = "form-horizontal" }))
        {
            <div class="top-dropdown left">
                <div class="arrow-up">
                </div>
                <ul>
                    <li>
                        <label>
                            Tên đăng nhập:</label>
                        @Html.TextBoxFor(x => x.UserName, new { @class = "txt", @id = "UserName" })
                        <div class="clearfix">
                        </div>
                    </li>
                    <li>
                        <label>
                            Mật khẩu:</label>
                        @Html.PasswordFor(x => x.Password, new { @class = "txt", @id = "txt-Password" })
                        <div class="clearfix">
                        </div>
                    </li>
                    <li class="login-controls"><span class="ctrl-left">
                        <label>
                            Nhớ mật khẩu</label>
                        <input type="checkbox" class="chk" />
                    </span><span class="ctrl-right">
                        <input type="submit" value="Đăng nhập" class="btn" />
                    </span>
                        <div class="clearfix">
                        </div>
                    </li>
                </ul>
            </div>
        }
    </li>
    <li><a href="@Url.Action("Register", "Home")">Đăng ký</a></li>
}